home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Misc / Wood.0.72 / Sources / WoodInspectorManager.m < prev    next >
Encoding:
Text File  |  1995-09-11  |  1.4 KB  |  84 lines

  1.  
  2. #import <misckit/MiscSwapView.h>
  3. #import "WoodInspectorManager.h"
  4.  
  5. #import "AttributesInspector.h"
  6. #import "StyleInspector.h"
  7. #import "TreeInspector.h"
  8.  
  9. @implementation WoodInspectorManager
  10.  
  11. - addDefaultInspectors
  12. {
  13.     [super addDefaultInspectors];
  14.     [[AttributesInspector new] setManager:self];
  15.     [[StyleInspector new] setManager:self];
  16.     [[TreeInspector new] setManager:self];
  17.     return self;
  18. }
  19.  
  20. - loadNibSection
  21. {
  22.     [super loadNibSection];
  23.     [window setBecomeKeyOnlyIfNeeded:YES];                     
  24.     return self;
  25. }
  26.  
  27. - makeKeyAndOrderFront:sender
  28. {    
  29.     if( [window isVisible] ) 
  30.         [window orderFront:sender];
  31.     else
  32.     {
  33.         [self updateInspectors];
  34.         [swapView swapContentView:matrix];
  35.     }
  36.     return self;
  37. }
  38.  
  39. - viewDidSwap:sender
  40. {
  41.     if( ![window isVisible] ) 
  42.         [window orderFront:self];
  43.  
  44.     return self;
  45. }
  46.  
  47. - inspect:anObject
  48. {
  49.     selection = anObject;
  50.     if( selection == nil ) 
  51.             selectionCount = 0;
  52.     else    selectionCount = 1;
  53.  
  54.     if( [window isVisible] )
  55.     {
  56.         [self updateInspectors];
  57.         [swapView swapContentView:matrix];
  58.     }
  59.     return self;
  60. }
  61.  
  62. - inspectList:aList
  63. {
  64.     // If there is not really a List of object to inspect then lets handle it
  65.     // as a simple inspection.
  66.     
  67.     if( [aList count] < 2 )
  68.         return [self inspect:[aList objectAt:0]];
  69.     
  70.     // ...ok its a true list.
  71.     
  72.     selection = aList;
  73.     selectionCount = [aList count];
  74.     if( [window isVisible] )
  75.     {
  76.         [self updateInspectors];
  77.         [swapView swapContentView:matrix];
  78.     }
  79.     return self;
  80. }
  81.  
  82. @end
  83.  
  84.